package com.glodon.paas.document.dao;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.glodon.paas.document.dao.domain.ProjectResourceEntity;

/**
 * @author wangchen
 */
public interface ProjectResourceDao extends DBDao<ProjectResourceEntity, String> {
    static Logger logger = LoggerFactory.getLogger(ProjectResourceDao.class);
    // 获取用户资源列表
    List<ProjectResourceEntity> selectByUser(String userId);
    
    // 获取该用户当前文件（夹）上的权限信息
    List<ProjectResourceEntity> selectByUserFile(String userId, String fileId);
    
    // 获取当前文件（夹）上的所有权限信息
    List<ProjectResourceEntity> selectByFile(String fileId);
    
    ProjectResourceEntity selectByFileRole(String fileId, String roleId);
    
    int update(ProjectResourceEntity entity);
}
